const fs = require('fs')
export const logTo = (path,tag) => {
    //将控制台输出导出到文件，方便查看各个抽象概念
    const log = fs.createWriteStream(path)
    log.once('open', () => {
        console.log({ log });
        console.log(`开始打包，${tag} log 输入流打开`)
    })

    log.once('close', () => {
        console.log(`打包结束，${tag} log输入流关闭`)
    })
}